package com.bw.been;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class OrderWide {
    String order_id;
    String order_polno;
    String order_userid;
    String name;
    String sex;
    String birthday;
    String ppp;
    String agebuy;
    String buydatetime;
    String insurname;
    String order_insurcode;
    String province;
    String city;
    String direction;
    String bpp;
    String policyyear;
    Double sa;
    Double cv1a;
    Double cv1b;
    Double surben;
    Double np;
    Double rsv2re;
    Double rsv1re;
    Double np2;
    Double premstd;
    Double premthismonth;
    String order_month;
    String order_orderTime;
    Double gj;
    String xueli;
    String ishouse;
    String xytz;
    String marryid;
    String ismoney;
    String isstart;
    String insurcetypestr;
    String pf;
    String pay_id;
    String pay_polno;
    String pay_userid;
    String pay_insurcode;
    String pay_orderTime;
    Double pay_gj;
    String pay_payTime;
    String houser_tagname;
    String marry_tagname;
    String start_tagname;
    String vip_tagname;
    String xueli_tagname;
    String xydj_tagname;

    public OrderWide(OrderInfo orderInfo, PaymentInfo paymentInfo) {
        mergeOrderInfo(orderInfo);
        mergepaymentInfo(paymentInfo);
    }

    public void mergeOrderInfo(OrderInfo orderInfo) {
        if (orderInfo != null) {
            this.order_id= orderInfo.id;
            this.order_polno=orderInfo.polno;
            this.order_userid=orderInfo.userid;
            this.name=orderInfo.name;
            this.sex=orderInfo.sex;
            this.birthday=orderInfo.birthday;
            this.ppp=orderInfo.ppp;
            this.agebuy=orderInfo.agebuy;
            this.buydatetime=orderInfo.buydatetime;
            this.insurname=orderInfo.insurname;
            this.order_insurcode=orderInfo.insurcode;
            this.province=orderInfo.province;
            this.city=orderInfo.city;
            this.direction=orderInfo.direction;
            this.bpp=orderInfo.bpp;
            this.policyyear=orderInfo.policyyear;
            this.sa=orderInfo.sa;
            this.cv1a=orderInfo.cv1a;
            this.cv1b=orderInfo.cv1b;
            this.surben=orderInfo.surben;
            this.np=orderInfo.np;
            this.rsv2re=orderInfo.rsv2re;
            this.rsv1re=orderInfo.rsv1re;
            this.np2=orderInfo.np2;
            this.premstd=orderInfo.premstd;
            this.premthismonth=orderInfo.premthismonth;
            this.order_month=orderInfo.month;
            this.order_orderTime=orderInfo.orderTime;
            this.gj=orderInfo.gj;
            this.xueli=orderInfo.xueli;
            this.ishouse=orderInfo.ishouse;
            this.xytz=orderInfo.xytz;
            this.marryid=orderInfo.marryid;
            this.ismoney=orderInfo.ismoney;
            this.isstart=orderInfo.isstart;
            this.insurcetypestr=orderInfo.insurcetypestr;
            this.pf=orderInfo.pf;
        }
    }

    public void mergepaymentInfo(PaymentInfo paymentInfo) {
        if (paymentInfo != null) {
            this.pay_id=paymentInfo.id;
            this.pay_polno=paymentInfo.polno;
            this.pay_userid=paymentInfo.userid;
            this.pay_insurcode=paymentInfo.insurcode;
            this.pay_orderTime=paymentInfo.orderTime;
            this.pay_gj=paymentInfo.gj;
            this.pay_payTime=paymentInfo.payTime;
        }
    }
}

